﻿<UserControl x:Class="Hotmail.HotmailWidget"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Properties="clr-namespace:Hotmail.Properties"
             Background="#358388" MouseLeftButtonUp="UserControlMouseLeftButtonUp">
    <UserControl.ContextMenu>
        <ContextMenu>
            <MenuItem Name="RefreshItem" Header="{x:Static Properties:Resources.RefreshItem}" Click="RefreshItemClick"/>
            <MenuItem Name="OptionsItem" Header="{x:Static Properties:Resources.OptionsItem}" Click="OptionsItemClick"/>
        </ContextMenu>
    </UserControl.ContextMenu>
    <UserControl.Resources>
        <Storyboard x:Key="TileAnim">
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" From="0" To="-20" Duration="0:0:0.18" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.18" To="0" Duration="0:0:0.14" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.32" To="-10" Duration="0:0:0.12" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.44" To="0" Duration="0:0:0.10" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid ClipToBounds="True">
        <Grid Name="ForegroundGrid">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="ForegroundGridTranslation"/>
            </Grid.RenderTransform>
            <Grid.Background>
                <LinearGradientBrush StartPoint="1,0" EndPoint="0,0">
                    <GradientStop Color="#52b4bd" Offset="0"/>
                    <GradientStop Color="#409fa5" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>
            <StackPanel Margin="10,10,10,30">
                <Grid VerticalAlignment="Top" HorizontalAlignment="Center">
                    <TextBlock Name="UnreadCount" FontSize="50" Foreground="White" TextAlignment="Center" Text="0" Width="112" Height="60" Visibility="Hidden" Margin="133,38,31,35" />
                    <Image Name="HotmailLogo" Height="115" HorizontalAlignment="Left" Margin="20,15,0,0" Stretch="Fill" VerticalAlignment="Top"  Visibility="Hidden" Width="126" Source="/Hotmail;component/Resources/hotmailLogo.png" />
                </Grid>
                <TextBlock Name="From" Foreground="White" FontSize="26" TextTrimming="CharacterEllipsis"/>
                <TextBlock Name="Header" Foreground="White" FontSize="14" Margin="0,3,0,0" TextTrimming="CharacterEllipsis"/>
                <TextBlock Name="Tip" Text="{x:Static Properties:Resources.Tip}" Foreground="White" FontSize="16" TextWrapping="Wrap" Visibility="Collapsed" />
                <TextBlock Name="Body" MaxHeight="60" Foreground="White" FontSize="14" Margin="0,3,0,0" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
            </StackPanel>
            <TextBlock Name="MailCount" Text="0" Foreground="White" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,10,10"/>
            <TextBlock Text="Microsoft Hotmail" Foreground="White" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="10,0,0,10"/>
        </Grid>
    </Grid>
</UserControl>
